﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WarehouseManagement.DataAccess;

namespace WarehouseManagement.BusinessLogic.DTO
{
    public class MerchandiseCategoryDTO
    {
        public int Id { get; set; }
        public string MerchandiseCategoryName { get; set; }
        public string Notes { get; set; }

        public MerchandiseCategory ToEntity()
        {
            return new MerchandiseCategory()
            {
               
                IsActive = true,
                MerchandiseCategoryName = MerchandiseCategoryName,
                Notes = Notes
            };
        }
    }
    public static class MerchandiseCategoryExtensions
    {
        public static MerchandiseCategoryDTO ToDTO(this MerchandiseCategory entity)
        {
            return new MerchandiseCategoryDTO()
            {
                Id = entity.Id,
                MerchandiseCategoryName = entity.MerchandiseCategoryName,
                Notes = entity.Notes
            };
        }
    }
}
